<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>结果页</title>
</head>
<style>
    body {
        margin: 0;
        background: rgb(244,154,170);
    }
    .box {
        max-width: 640px;
        margin: 0 auto;

    }

    .upload-img {
        text-align: center;
    }

    .upload-img >img {
        width: 85%;
        margin-top: 10%;
    }

    .upload-tip {
        color: #ffffff;
        margin-top: 10%;
        font-size: 20px;
        text-align: center;
    }

    .upload-btn {
        margin-top: 10%;
        padding-bottom: 10%;
        text-align: center;
    }

    .upload-btn > span {
        padding: 10px 25px;
        border-radius: 10px;
        background: rgb(222,64,95);
        outline: none;
        color: #ffffff;
    }
</style>
<body>
<div class="box">
    <div class="upload-img">
        <img id="pic" src=" ">
    </div>
    <div class="upload-tip">
        鉴定结果
        <div id="content"></div>
    </div>
</div>
</body>
<script src="jquery.min.js"></script>
<script>
  $(function () {
    var  urls = localStorage.getItem('urls');
    $('#pic').attr('src',urls);
    $.ajax({
      url : 'pics.php?urls='+urls,
      type: 'GET',
      dataType: 'json',
      success: function (e) {
        //console.log(e);

        $tmp = '<span>图片场景:</span><span>'+e[0].label+'</span><br>';
        $tmp += '<span> 分数：</span><span>'+e[0].rate+'</span>(结果为该分类的概率；值越高，越趋于该分类)<br>';
        $tmp += '<span> 图片是否违规:</span><span>'+e[0].suggestion+'</span><br>';
        $('#content').html($tmp);
      },
      error: function (e) {
        alert('确定图片链接可以正确访问');
      }

    });
  });
</script>
</html>